package com.health.model.enity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("sp_manager")
public class Manager implements Serializable {

    @TableId(value = "mg_id",type = IdType.AUTO)
    private Integer id;

    @TableField("mg_name")
    private String username;

    @TableField("mg_pwd")
    private String password;
    @TableField("mg_time")
    private Integer mg_time;
    @TableField("role_id")
    private Integer role_id;
    @TableField("mg_mobile")
    private String mobile;
    @TableField("mg_email")
    private String email;
    @TableField("mg_state")
    private Integer type;

    @TableField(exist = false)
    private String role_name;


    //因为mybatis使用驼峰命名，提供
    public void setMgTime(Integer mg_time) {
        this.mg_time = mg_time;
    }

    public void setRoleId(Integer role_id) {
        this.role_id = role_id;
    }
}
